package com.mystore.service.impl;

import com.mystore.dao.KindDao;
import com.mystore.dao.impl.KindDaoImpl;
import com.mystore.entity.Kind;
import com.mystore.service.KindService;
import com.mystore.util.DBUtil;

import java.sql.Connection;
import java.util.List;

public class KindServiceImpl implements KindService {

    @Override
    public List<Kind> findAllKind() {
        Connection connection = DBUtil.getConntion();
        KindDao kindDao = new KindDaoImpl();
        List<Kind> list = (List<Kind>)kindDao.findAllKind(connection);
        DBUtil.closeConnection(connection);
        return list;
    }
}
